package client.gui;

import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
/**
 * ImagePanel
 */
public class ImagePanel extends JPanel {
    Image image;

    public ImagePanel(Image image) {
        super();
        this.image = image;
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        setSize(image.getWidth(null), image.getHeight(null));
        g.drawImage(image, 0, 0, this);
    }
}
